<?php

namespace app\api\validate;

use think\Validate;

class Ask extends Validate{
    /**
     * 验证规则
     */
    protected $rule = [
        //提问内容
        'question' => [
            'require',
        ],
        'goods_id' => [
            'require',
        ],
        'user_id' => [
            'require',
        ],
        'remark' => [
            'require',
        ],
        'wxapp_id' => [
            'require',
        ],

    ];

    protected $message  =   [
        'question.require'   => '提问内容不能为空',
        'goods_id.require'   => '商品id不能为空',
        'user_id.require'   => '用户id不能为空',
        'remark.require'   => '提问标签不能为空',
        'wxapp_id.require'   => 'wxapp_id参数不能为空',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['question','user_id','goods_id','remark','wxapp_id'],
    ];
}
